Skip to content

chore: implement floordiv_op compiler #1995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chelsea-lin
Copy link
Contributor

Fixes internal issue 430133370 🦕

@product-auto-label product-auto-label bot added size: l Pull request size is large. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Aug 14, 2025
@chelsea-lin chelsea-lin marked this pull request as ready for review August 14, 2025 23:38
@chelsea-lin chelsea-lin requested review from a team as code owners August 14, 2025 23:38
@chelsea-lin chelsea-lin requested a review from tswast August 14, 2025 23:38
Comment on lines +106 to +107
# DIV(N, 0) will error in bigquery, but needs to return `0` for int, and
# `inf`` for float in BQ so we short-circuit in this case.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be worth mentioning that this is also why we can't use SAFE_DIVIDE.

# `inf`` for float in BQ so we short-circuit in this case.
# Multiplying left by zero propogates nulls.
zero_result = (
constants._INF
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to do -inf for negative values?

@GarrettWu GarrettWu removed their assignment Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants